<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        h1{color: red}
    </style>
</head>
<body>
    这是首页
    <span></span>
    <p>duanluo </p>
    <h1>yijibiaoti </h1>
</body>
<script>
    document.onclick = function(){
        var url = "/api/chapters/json";

        const xhr = new XMLHttpRequest();
        xhr.open("get",url);
        xhr.onload = function(){
            if(xhr.status === 200){
                console.log(xhr.responseText)
            }
        }
        xhr.send();
    }
</script>
</html>